<?php
header("content-type:text/html;charset=utf8");
$id=$_POST['hid'];
$username=$_POST['username'];
$userpwd=$_POST['userpwd'];
$dbh  = new  PDO ( 'mysql:host=localhost;dbname=mhsw' , 'root' , 'root' );
$sql="update jj set username='$username',userpwd='$userpwd' where  id='$id'";
$arr=$dbh->exec($sql);
if($arr)
{
    //header('location:zhi.php');
    header('location:list.php');
}
else
{
    echo "修改失败";
}
?>